package com.ihunanren.dao.ibatis.weixin;

import java.sql.SQLException;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.ihunanren.dao.pojo.SchoolCurriculumDefinedDO;
import com.ihunanren.dao.weixin.ISchoolCurriculumDefinedDao;

public class SchoolCurriculumDefinedDao extends SqlMapClientDaoSupport
		implements ISchoolCurriculumDefinedDao {

	@Override
	public SchoolCurriculumDefinedDO getByDiyName(String diyName)
			throws SQLException {
		return (SchoolCurriculumDefinedDO) getSqlMapClient().queryForObject("SchoolCurriculumDefinedDao.getByDiyName",diyName);
	}

	@Override
	public SchoolCurriculumDefinedDO getByDefinedId(long definedId)
			throws SQLException {
		return (SchoolCurriculumDefinedDO) getSqlMapClient().queryForObject("SchoolCurriculumDefinedDao.getByDefinedId",definedId);
	}



	@Override
	public void insertSchoolCurriculumDefinedDO(
			SchoolCurriculumDefinedDO definedDO) throws SQLException {
		getSqlMapClient().insert("SchoolCurriculumDefinedDao.insertSchoolCurriculumDefinedDO",definedDO);
	}

	@Override
	public boolean updateSchoolCurriculumDefinedDO(
			SchoolCurriculumDefinedDO definedDO) throws SQLException {
		return getSqlMapClient().update("SchoolCurriculumDefinedDao.updateSchoolCurriculumDefinedDO",definedDO)>0;
	}

	@Override 
	public SchoolCurriculumDefinedDO getByUserNamed(String name)
			throws SQLException {
		return (SchoolCurriculumDefinedDO) getSqlMapClient().queryForObject("SchoolCurriculumDefinedDao.getByUserNamed",name);
	}

	@Override
	public SchoolCurriculumDefinedDO getByEmail(String email)
			throws SQLException {
		return (SchoolCurriculumDefinedDO) getSqlMapClient().queryForObject("SchoolCurriculumDefinedDao.getByEmail",email);
	}
	

}
